package cn.tedu.coolshark01.product.controller;


import cn.tedu.coolshark01.base.response.JsonResult;
import cn.tedu.coolshark01.product.service.ProductService;
import cn.tedu.coolshark01.user.pojo.vo.ProductVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/v1/product")
public class ProductController {

    @Autowired
    private ProductService productService;

    @RequestMapping("select")
    public JsonResult selectproduct(){
        log.debug("开始处理查询商品信息请求");
        List<ProductVO> list = productService.selectproduct();
        return JsonResult.ok(list);
    }
}
